package symbolTable.primaryST;

public class STdemo {
    public static void main(String[] args) {
        testSequentialSearchST();
//        testBinarySearchST();
    }
    public static void testSequentialSearchST(){
        SequentialSearchST<String, String> sequentialSearchST = new SequentialSearchST<>();
        sequentialSearchST.put("1","cz");
        sequentialSearchST.put("2","ab");
        sequentialSearchST.put("3","kk");
        sequentialSearchST.put("4","li");
        sequentialSearchST.put("5","op");
        sequentialSearchST.put("2","nb");
        sequentialSearchST.delete("4");
        String s = sequentialSearchST.get("2");
        System.out.println(s);
        System.out.println(sequentialSearchST.size());
        for (String key:sequentialSearchST.keys())
            System.out.println(key);
    }
    public static void testBinarySearchST(){
        BinarySearchST<String, String> binarySearchST = new BinarySearchST<>();
        binarySearchST.put("1","cz");
        binarySearchST.put("2","ab");
        binarySearchST.put("3","kk");
        binarySearchST.put("4","li");
        binarySearchST.put("5","op");
        binarySearchST.put("2","nb");
        binarySearchST.delete("1");
        String s = binarySearchST.get("2");
        System.out.println(s);
        System.out.println(binarySearchST.size());
        for (String key:binarySearchST.keys())
            System.out.println(key);
    }
}
